What is the difference between Extended Properties Definition created with EWS Managed API and User properties created with the outlook addin.
I can write a custom property like this using the EWS Managed API:
private void setProperty(Item item, Property prop) {
item.Load();
item.SetExtendedProperty(Prop.name, Prop.value);
ConflictResolutionMode mode = ConflictResolutionMode.AlwaysOverwrite;
item.Update(mode);
}
Where Prop is an object, that contains an Extended Property definition and object value:
ExtendedPropertyDefinition prop = new ExtendedPropertyDefinition(
DefaultExtendedPropertySet.PublicStrings, "Prop", MapiPropertyType.String);
Inside of the Outlook Add-In User Properties are set using this method:
mailItem.UserProperties.Add("PropName", Microsoft.Office.Interop.Outlook.OlUserPropertyType.olText).Value = PropValue;
In EWS Managed API how do you access these properties set in the outlook addin?
Second Question:
These properties set using the UserProperties, Add method, persist on message send. Do properties set to a mailItem using SetExtendedProperty, of EWS persist across message send. If not what property can be used to do so?